/**
 * @Author: raoq
 * @Date: 2022-04-26
 * @Last Modified by: raoq
 * @Last Modified time: 2022-06-24
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const queryList = (params) => axios.post(`${SERVER.WHOLESALES}/shipmentOrderQuery/queryList`, params)
// 查询详情
export const getDetail = (params) => axios.post(`${SERVER.WHOLESALES}/shipmentOrderQuery/queryById`, params)
// 发运
export const shippedOrder = (params) => axios.post(`${SERVER.WHOLESALES}/shipmentOrderQuery/shippedOrder`, params)
//同步物流信息
export const synchronousCarrier = (params) => axios.post(`${SERVER.WHOLESALES}/shipmentOrderQuery/synchronousCarrierData`, params)

//交货单下发
export const querySapDelivery = (params) => axios.post(`${SERVER.WHOLESALES}/timeTask/querySapDelivery`, params)

//货运单导入模板下载
export const excelTemplate = (params) => axios.post(`${SERVER.WHOLESALES}/shipmentOrderQuery/exportTemplate`, params, { responseType: 'blob' })
// 导出
export const exportList = (params) => axios.post(`${SERVER.WHOLESALES}/shipmentOrderQuery/exportList`, params, { responseType: 'blob' })
// 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);

//查看物流
export const findLogisticsInfo = params =>
  axios.get(`${SERVER.WHOLESALES}/shipmentOrderQuery/findLogisticsInfo?carrierBillCode=${params.carrierBillCode}&vin=${params.vin}`);
